//
//  LYVideoBottomView.m
//  LYLiveApp
//
//  Created by QD on 2017/5/25.
//  Copyright © 2017年 览益信息科技. All rights reserved.
//

#import "LYVideoBottomView.h"

@implementation LYVideoBottomView

- (IBAction)commentAction:(id)sender {
    
    self.commentBlock ? self.commentBlock():nil;
}

- (IBAction)likeAction:(id)sender {
    
    self.likeBlock ? self.likeBlock():nil;
}

- (IBAction)shareAction:(id)sender {
    
    self.shareBlock ? self.shareBlock():nil;
}

- (void)layoutSubviews {

    [super layoutSubviews];
 
    self.likeButton.contentHorizontalAlignment = UIControlContentHorizontalAlignmentLeft;
    self.likeButton.contentVerticalAlignment = UIControlContentVerticalAlignmentTop;
    [self.likeButton setImageEdgeInsets:UIEdgeInsetsMake(8, self.likeButton.width/2 - 10, 0, 0)];

    self.shareButton.titleLabel.font = [UIFont systemFontOfSize:10];
    self.shareButton.titleLabel.textAlignment = NSTextAlignmentCenter;
    self.shareButton.titleLabel.frame = CGRectMake(0, 33, self.shareButton.size.width, 14);
    [self.shareButton setTitleColor:[UIColor colorWithHexString:@"#949494"] forState:UIControlStateNormal];
    self.shareButton.contentHorizontalAlignment = UIControlContentHorizontalAlignmentLeft;
    self.shareButton.contentVerticalAlignment = UIControlContentVerticalAlignmentTop;
    [self.shareButton setImageEdgeInsets:UIEdgeInsetsMake(6, self.shareButton.width/2 - 10, 0, 0)];
    [self.shareButton setTitleEdgeInsets:UIEdgeInsetsMake(33, -8, 0, 0)];
}

+ (instancetype)viewWithXib
{
    LYVideoBottomView *view = [[[UINib nibWithNibName:@"LYVideoBottomView" bundle:nil] instantiateWithOwner:self options:nil] firstObject];
    return view;
}
@end



